const install = (Vue,vm) =>
{
    let check = () => {
        let LoginUser = uni.getStorageSync('LoginUser') ? uni.getStorageSync('LoginUser') : {}

        if(!LoginUser || JSON.stringify(LoginUser) === '{}')
        {
            uni.showToast({
                title:'请先登录',
                icon:'error'
            })

            return false
        }

        return true
    }

    vm.$u.auth = {
        check
    }
}

export default
{
    install
}